﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL.DataSourceInterface;
using DAL.Entities;
using DAL.DataSourceImplementation.DataSourceDB;

namespace DAL.DataSourceImplementation
{
    public class TerrenoDAO : ITerrenoDAO
    {
        public static string connName;

        public TerrenoDAO(string _connName)
        {
            connName = _connName;
        }

        public void Create(Terreno entity)
        {
            //CONTEXTO BD
            using (PublicaTuPropiedadDB db = new PublicaTuPropiedadDB(connName))
            {
                db.Terreno.Add(entity);
                db.SaveChanges();
            }
        }
    }
}
